nomadBooks
Community book catalog
Identity and Authentication on Reticulum
Restricted pages in NomadNet
NomadNet builds page permissions directly on top of that primitive. From the
program's built-in guide, section "Authenticating Users":
Sometimes, you don't want everyone to be able to view certain pages or
execute certain scripts. In such cases, you can use authentication to
control who gets to run certain requests.
To enable authentication for any page, simply add a new file to your pages
directory with ".allowed" added to the file-name of the page. If your page
is named "secret_page.mu", just add a file named "secret_page.mu.allowed".
For each user allowed to access the page, add a line to this file,
containing the hash of that users primary identity.
There is a nice touch: the list does not have to be static.
You can also dynamically generate this list, by making the file executable,
and writing a script (in whatever language you want), that prints the list
to stdout. Every time someone tries to request the page, Nomad Network will
check the allowed identities list, and only grant access to allowed users.
Two practical notes for operators. The check happens inside the node before
your page script is executed, so a protected page never runs for an
unauthorised caller - it cannot fall back to asking for a password, because it
never gets the chance. And the .allowed files are skipped by the page scanner,
so they are never served to anyone.
Page 1 / 1
────────────────────────────────────────────────────────────────────
Off-Grid Community Suite · NomadNet